package com.itheima.test1;

public class GirlFriendTest {
    public static void main(String[] args) {
        //创建对象
        GirlFriend gf1 = new GirlFriend("小诗", 19);
        int age = gf1.getAge();
        String name = gf1.getName();
        System.out.println(age);
        System.out.println(name);
        //现在不能直接调用成员变量进行修改
        //要用set和get进行赋值修改和得到
        gf1.setAge(20);
        System.out.println(gf1.getAge());
    }
}
